﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsFormsApplication1
{
    class SampleRates
    {
	public static int SampleRate = 360; 
    public static double msPerSample = (double) 1000 / (double) SampleRate;

    public static int ms10 = (int) (10 / SampleRates.msPerSample + 0.5);
    public static int ms25 = (int) (25 / SampleRates.msPerSample + 0.5);
    public static int ms30 = (int) (30 / SampleRates.msPerSample + 0.5);
    public static int ms80 = (int) (80 / SampleRates.msPerSample + 0.5);
    public static int ms95 = (int) (95 / SampleRates.msPerSample + 0.5);
    public static int ms100 = (int) (100 / SampleRates.msPerSample + 0.5);
    public static int ms125 = (int) (125 / SampleRates.msPerSample + 0.5);
    public static int ms150 = (int) (150 / SampleRates.msPerSample + 0.5);
    public static int ms160 = (int) (160 / SampleRates.msPerSample + 0.5);
    public static int ms175 = (int) (175 / SampleRates.msPerSample + 0.5);
    public static int ms195 = (int) (195 / SampleRates.msPerSample + 0.5);
    public static int ms200 = (int) (200 / SampleRates.msPerSample + 0.5);
    public static int ms220 = (int) (220 / SampleRates.msPerSample + 0.5);
    public static int ms250 = (int) (250 / SampleRates.msPerSample + 0.5);
    public static int ms300 = (int) (300 / SampleRates.msPerSample + 0.5);
    public static int ms360 = (int) (360 / SampleRates.msPerSample + 0.5);
    public static int ms450 = (int) (450 / SampleRates.msPerSample + 0.5);
    public static int ms1000 = SampleRate;
    public static int ms1500 = (int) (1500 / SampleRates.msPerSample);

    public static int derivLength = ms10;
    public static int lpBufferLgth = (int) (2 * ms25);
    public static int hpBufferLgth = ms125;
    public static int windowWidth = ms80; 
    public static bool debug = false;
		
	public static void setSampleRates(int sampleRates) {
        SampleRates.SampleRate = sampleRates;

        SampleRates.msPerSample = (double) 1000 / (double) sampleRates;
        SampleRates.ms10 = (int) (10 / SampleRates.msPerSample + 0.5);
        SampleRates.ms25 = (int) (25 / SampleRates.msPerSample + 0.5);
        SampleRates.ms30 = (int) (30 / SampleRates.msPerSample + 0.5);
        SampleRates.ms80 = (int) (80 / SampleRates.msPerSample + 0.5);
        SampleRates.ms95 = (int) (95 / SampleRates.msPerSample + 0.5);
        SampleRates.ms100 = (int) (100 / SampleRates.msPerSample + 0.5);
        SampleRates.ms125 = (int) (125 / SampleRates.msPerSample + 0.5);
        SampleRates.ms150 = (int) (150 / SampleRates.msPerSample + 0.5);
        SampleRates.ms160 = (int) (160 / SampleRates.msPerSample + 0.5);
        SampleRates.ms175 = (int) (175 / SampleRates.msPerSample + 0.5);
        SampleRates.ms195 = (int) (195 / SampleRates.msPerSample + 0.5);
        SampleRates.ms200 = (int) (200 / SampleRates.msPerSample + 0.5);
        SampleRates.ms220 = (int) (220 / SampleRates.msPerSample + 0.5);
        SampleRates.ms250 = (int) (250 / SampleRates.msPerSample + 0.5);
        SampleRates.ms300 = (int) (300 / SampleRates.msPerSample + 0.5);
        SampleRates.ms360 = (int) (360 / SampleRates.msPerSample + 0.5);
        SampleRates.ms450 = (int) (450 / SampleRates.msPerSample + 0.5);
        SampleRates.ms1000 = SampleRate;
        SampleRates.ms1500 = (int) (1500 / SampleRates.msPerSample);

        SampleRates.derivLength = SampleRates.ms10;
        SampleRates.lpBufferLgth = (int) (2 * SampleRates.ms25);
        SampleRates.hpBufferLgth = SampleRates.ms125;
        SampleRates.windowWidth = SampleRates.ms80;
    }	
		
		
    }
}
